package dk.sdu.mmmi.opn.rmi.observer;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * Distributed observer pattern implementation: interface for observer role
 * Interface for a remote object that can observe remotely observable objects implementing
 * the IRemoteObserver interface
 * @author ups
 */
public interface IRemoteObserver extends Remote {
	/**
	 * Callback from the observed object, according to the observer pattern
	 * @param target the remote object that generated the notification
	 * @param event an object representing the event
	 * @throws RemoteException if a communication error occurred
	 */
	void update(IRemoteObservable target, Object event) throws RemoteException;
}
